import { useNavigate } from "react-router-dom";

function Register() {
    const navigate = useNavigate()
    return (
        <div>
            <button onClick={() => navigate('/', {state: 'From the register page'})}>注册</button>
        </div>
    )
}
export default Register